import {NgModule} from "@angular/core";
import {NzMessageModule} from "ng-zorro-antd/message";
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
import {ScrollingModule} from '@angular/cdk/scrolling'
import { DragDropModule } from '@angular/cdk/drag-drop';
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {en_US, NZ_I18N, NzI18nModule} from "ng-zorro-antd/i18n";
import {NZ_ICONS, NzIconModule} from "ng-zorro-antd/icon";
import * as AllIcons from '@ant-design/icons-angular/icons';
import { IconDefinition } from '@ant-design/icons-angular';
import {NzButtonModule} from "ng-zorro-antd/button";
import {NzModalModule} from "ng-zorro-antd/modal";

const antDesignIcons = AllIcons as {
  [key: string]: IconDefinition;
};
const icons: IconDefinition[] = Object.keys(antDesignIcons).map(key => antDesignIcons[key])
@NgModule({
  imports: [],
  declarations: [],
  providers: [
    { provide: NZ_I18N, useValue: en_US },
    { provide: NZ_ICONS, useValue: icons }
  ],
  bootstrap: [],
  exports: [
    NzMessageModule,
    BrowserAnimationsModule,
    ScrollingModule,
    DragDropModule,
    FormsModule,
    ReactiveFormsModule,
    NzModalModule,
    NzButtonModule,
    NzI18nModule,
    NzIconModule
  ]
})
export class NzModule {
}
